--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 0baebe5a3cb25c217a0016766506744e26062e1a
Parents : 3fedd0a
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-10-30T14:09:12+01:00
Propagation node stamp cost handling
Changes
Diff
diff --git a/nomadnet/ui/textui/Network.py b/nomadnet/ui/textui/Network.py
index e59dc1a..dba502b 100644
--- a/nomadnet/ui/textui/Network.py
+++ b/nomadnet/ui/textui/Network.py
@@ -1844,16 +1844,22 @@ class LXMFPeerEntry(urwid.WidgetWrap):
focus_style = "list_focus_unresponsive"
if peer.propagation_transfer_limit: txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
- else: txfer_limit = "No"
+ else: txfer_limit = "No"
if peer.propagation_sync_limit: sync_limit = RNS.prettysize(peer.propagation_sync_limit*1000)
- else: sync_limit = "Unknown"
+ else: sync_limit = "Unknown"
+
+ if peer.propagation_stamp_cost: sct = peer.propagation_stamp_cost
+ else: sct = "Unknown"
+
+ if peer.propagation_stamp_cost_flexibility: scf = f" (flex {peer.propagation_stamp_cost_flexibility})"
+ else: scf = ""
ar = round(peer.acceptance_rate*100, 2)
peer_info_str = sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))
- peer_info_str += f"\n {sync_limit} sync limit, {txfer_limit} msg limit\n"
- peer_info_str += f" {RNS.prettyspeed(peer.sync_transfer_rate)} STR, "
- peer_info_str += f"{RNS.prettyspeed(peer.link_establishment_rate)} LER"
+ peer_info_str += f"\n {sync_limit} sync limit, {txfer_limit} msg limit"
+ peer_info_str += f"\n {RNS.prettyspeed(peer.sync_transfer_rate)} STR, {RNS.prettyspeed(peer.link_establishment_rate)} LER"
+ peer_info_str += f"\n {sct} propagation cost{scf}"
peer_info_str += "\n "+str(peer.unhandled_message_count)+f" unhandled LXMs, {ar}% AR"
widget = ListEntry(peer_info_str)
self.display_widget = urwid.AttrMap(widget, style, focus_style)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────